﻿using System;
using System.Collections.Generic;
using Gameplay.PVE.Utils;
using RootMotion.FinalIK;
using UnityEngine;
using Yoozoo.Libs;

namespace Gameplay.PVE.Survivor
{
    /// <summary>
    /// 被控制的行为
    /// </summary>
    public class ControlAction: IClass
    {
        public BattleUnit unit;
        public ControlElement controlElement;

        public virtual float GetDuration()
        {
            return controlElement.config.duration;
        }

        public int GetPriority()
        {
            return (int)controlElement.config.sub_type;
        }
         
        
        public void OnReset()
        {
            unit = null;
            controlElement = null;
        }

        public void Initialize(BattleUnit unit, ControlElement controlElement)
        {
            this.unit = unit;
            this.controlElement = controlElement;
        }
        
        public virtual void Start()
        {
            
        }

        public virtual void Update()
        {
            
        }

        public virtual void End()
        {
            
        }

        public virtual void Pause()
        {
            
        }

        public virtual void Resume()
        {
            
        }
    }
}
